import Mock from 'mockjs'

export default [
  {
    url: /\/metrics\/json/,
    type: 'get',
    data: () => {
      return {
        code: 200,
        msg: 'success',
        data: Mock.mock({
          vea_request_total: [
            {
              'value|50-100': 1,
            },
          ],
          vea_request_total_by_dims: [
            {
              labels: {
                method: 'GET',
                path: '/api/v1/apis/list',
              },
              'value|1-100': 1,
            },
            {
              labels: {
                method: 'GET',
                path: '/api/v1/user/captcha',
              },
              'value|1-100': 1,
            },
            {
              labels: {
                method: 'GET',
                path: '/api/v1/user/menu/list',
              },
              'value|1-100': 1,
            },
            {
              labels: {
                method: 'OPTIONS',
                path: '/api/v1/apis/list',
              },
              'value|1-100': 1,
            },
            {
              labels: {
                method: 'POST',
                path: '/api/v1/user/login',
              },
              'value|1-100': 1,
            },
          ],
          vea_response_total: [
            {
              'value|1-50': 1,
            },
          ],
          vea_response_total_by_dims: [
            {
              labels: {
                code: '200',
                method: 'GET',
                path: '/api/v1/apis/list',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '200',
                method: 'GET',
                path: '/api/v1/user/captcha',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '200',
                method: 'GET',
                path: '/api/v1/user/menu/list',
              },
              'value|10-100': 3,
            },
            {
              labels: {
                code: '200',
                method: 'POST',
                path: '/api/v1/user/login',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '204',
                method: 'OPTIONS',
                path: '/api/v1/apis/list',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '400',
                method: 'POST',
                path: '/api/v1/user/login',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '401',
                method: 'GET',
                path: '/api/v1/apis/list',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '403',
                method: 'GET',
                path: '/api/v1/apis/list',
              },
              'value|10-100': 1,
            },
            {
              labels: {
                code: '500',
                method: 'GET',
                path: '/api/v1/apis/list',
              },
              'value|10-100': 1,
            },
          ],
          vea_server_state_cpu_load: [
            {
              'value|10-100.2-5': 1,
            },
          ],
          vea_server_state_mem_usage: [
            {
              'value|10-100': 1,
            },
          ],
        }),
      }
    },
  },
]
